﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="asp._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <style>
        td{
            width:250px;
            text-align:center;
        }
        th{
            text-align:center;
        }
    </style>

    <asp:GridView runat="server" ID="gv1" AutoGenerateColumns="false" OnRowCancelingEdit="gv1_RowCancelingEdit" OnRowDeleting="gv1_RowDeleting" OnRowEditing="gv1_RowEditing" OnRowUpdating="gv1_RowUpdating">
        <Columns>
            <asp:BoundField DataField="Id" HeaderText="Id" ControlStyle-BackColor="Yellow" />
            <asp:BoundField DataField="Title" HeaderText="标题" />
            <asp:BoundField DataField="Content" HeaderText="内容" />
            <asp:BoundField DataField="Author" HeaderText="作者" />
            <asp:BoundField DataField="Remarks" HeaderText="备注" />
            <asp:CommandField ShowCancelButton="true"  ShowEditButton="true" ShowDeleteButton="true" HeaderText="操作" />
        </Columns>
    </asp:GridView>
    <asp:Button runat="server" ID="btnAdd" Text="新增" OnClick="btnAdd_Click" />

</asp:Content>
